package xyz.kongbai121.config;

import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.context.annotation.Configuration;


/**
 * 相应时统一把Long(long)转为string
 *
 * @author kongbai121
 * @date 2021/11/24
 */
@Configuration
public class JsonModuleConfig extends SimpleModule {

    public JsonModuleConfig() {
      this.addSerializer(Long.class, ToStringSerializer.instance);
      this.addSerializer(Long.TYPE, ToStringSerializer.instance);
    }

}
